package pack0901;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class DemoE2 {
    public static void main(String[] args) {
        ExecutorService es = Executors.newFixedThreadPool(3);
        DemoE21 demoE21 = new DemoE21();
        DemoE21 demoE22 = new DemoE21();
        DemoE21 demoE23 = new DemoE21();
        DemoE21 demoE24 = new DemoE21();
        DemoE21 demoE25 = new DemoE21();
        DemoE21 demoE26 = new DemoE21();
        es.execute(demoE21);
        es.execute(demoE22);
        es.execute(demoE23);
        es.execute(demoE24);
        es.execute(demoE25);
        es.execute(demoE26);
    }
}
class DemoE21 implements Runnable{
    @Override
    public void run() {
        System.out.println("aaa"+Thread.currentThread().getName());
        try {
            Thread.sleep(1000);
        }catch (Exception e){}
    }
}
